package com.chouxiaozi.rabbitmq.receiver;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Description
 * @Author Administrator
 * @Date 2020/7/414:48
 * @Version 1.0
 */
@Component
public class DirectReceiver {

    @RabbitListener(queues = "directQueue")
    @RabbitHandler
    public void handle(String msg){
        System.out.println("DirectReceiver>> "+msg);
    }
}
